<template>
  <view class="container">
    <!-- 表单 -->
    <view class="form">
      <view class="formitem">
        <view style="font-size: 30rpx; margin-right: 30rpx">收货人</view>
        <input type="text" class="iptstyle" placeholder="姓名" />
      </view>
      <view class="formitem">
        <view style="font-size: 30rpx">手机号码</view>
        <input type="text" class="iptstyle" placeholder="手机号" />
        <view class="choosephone">
          <text>+86</text>
          <uni-icons type="down" size="20"></uni-icons>
        </view>
      </view>
      <view class="formitem">
        <view style="font-size: 30rpx">所在地区</view>
        <input type="text" class="iptstyle" placeholder="省、市、区" />
        <uni-icons type="right" size="20" class="righticon"></uni-icons>
      </view>
      <view style="display: flex; margin-left: 30rpx; margin-top: 30rpx">
        <view style="margin-top: 20rpx; margin-right: 60rpx">详情地址</view>
        <textarea
          id=""
          cols="30"
          rows="10"
          placeholder="小区楼栋/乡村名称"
          style="box-sizing: border-box; width: 490rpx; height: 202rpx; background: #f2f2f2; padding: 32rpx; font-size: 28rpx; border-radius: 20rpx 20rpx 20rpx 20rpx"
        ></textarea>
      </view>
    </view>
    <!-- 设置默认收获地址 -->
    <view style="display: flex; align-items: center; box-sizing: border-box; justify-content: space-between; padding: 0 30rpx; margin-top: 52rpx">
      <view style="font-size: 30rpx; font-family: PingFang SC, PingFang SC; font-weight: bold; color: #222222">设置默认收获地址</view>
      <label style="font-size: 24rpx">
        <radio style="transform: scale(0.7)" color="#0398FF" backgroundColor="#EFEFEF" :checked="checkstate" @click="changecheckstate" />
      </label>
    </view>

    <!-- 保存按钮 -->
    <view class="savebtn">保存</view>
    <!-- 底部组件 -->
    <footerCom style="position: fixed; bottom: 0"></footerCom>
    <!-- 解决固定定位的覆盖问题 -->
    <view style="position: relative; bottom: 0; width: 750rpx; height: 98rpx"></view>
  </view>
</template>

<script>
import footerCom from '@/components/shopfooter/shopfooter.vue';
export default {
  components: {
    footerCom
  },
  data() {
    return {
      checkstate: false
    };
  },
  methods: {
    // 设置为默认地址
    changecheckstate() {
      this.checkstate = !this.checkstate;
    }
  }
};
</script>

<style lang="less" scoped>
.container {
  background-color: #ffffff;
  padding-top: 30rpx;
  .form {
    .formitem {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding: 0 30rpx;
      margin-top: 30rpx;
      .iptstyle {
        box-sizing: border-box;
        width: 500rpx;
        height: 100rpx;
        background: #f2f2f2;
        margin-left: 64rpx;
        padding-left: 32rpx;
        border-radius: 20rpx 20rpx 20rpx 20rpx;
      }
      .righticon {
        position: absolute;
        right: 50rpx;
      }
      .choosephone {
        position: absolute;
        right: 50rpx;
      }
    }
  }
  .savebtn {
    width: 640rpx;
    height: 100rpx;
    color: #ffffff;
    text-align: center;
    line-height: 100rpx;
    background: linear-gradient(133deg, #f11f1f 0%, #ee6d6d 100%);
    border-radius: 200rpx 200rpx 200rpx 200rpx;
    margin-left: 56rpx;
    margin-top: 300rpx;
  }
}
</style>
